Skip to content

chore(search): remove entrances array from caves Typesense index#1703

Merged
ClemRz merged 1 commit into
developfrom
chore/remove-entrances-from-search
Jun 26, 2026
Merged

chore(search): remove entrances array from caves Typesense index#1703
ClemRz merged 1 commit into
developfrom
chore/remove-entrances-from-search

Conversation

@ClemRz

@ClemRz ClemRz commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

🤔 What

🤷‍♂️ Why

The entrances array was only indexed so the frontend could derive a count via .length. With nbEntrances as a first-class scalar (added in #1676), the array is redundant — it wastes index RAM and inflates payloads.

The frontend has migrated to use nbEntrances (GrottoCenter/grottocenter-front#1402).

🔍 How

Removed the entrances join from processRows in api/dbSync/entities/cave.js. The Typesense schema and CaveService.updateInSearch already only reference the nbEntrances scalar — no changes needed there.

After deploy, a full re-sync should be triggered to drop the stale entrances field from existing documents in Typesense.

🧪 Testing

All existing tests pass (261 passing, 0 failing). No new tests needed — this is a removal of dead code.

📸 Previews

N/A

- Remove entrances join from dbSync processRows (no longer needed)
- Schema and updateInSearch already only use nbEntrances scalar

Closes #1682
@ClemRz ClemRz self-assigned this Jun 26, 2026
@ClemRz ClemRz requested a review from Paul-AUB June 26, 2026 15:28

@Paul-AUB Paul-AUB left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean, targeted removal. The change is correct and complete for the batch sync path.

@ClemRz ClemRz merged commit 0aa51c2 into develop Jun 26, 2026
5 checks passed
@ClemRz ClemRz deleted the chore/remove-entrances-from-search branch June 26, 2026 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore(search): remove entrances array from caves Typesense index after frontend migration

2 participants